package ldkxingzhe.l365calendar.activity;

import android.support.v4.app.FragmentActivity;
import android.view.View;
import android.widget.Toast;

import com.umeng.analytics.MobclickAgent;

/**
 * 公共类，　继承自v4包的FragmentActivity
 * Created by xingzhe on 16/1/14.
 */
@SuppressWarnings("unused")
public class BaseActivity extends FragmentActivity{
    private final String TAG = "BaseActivity";

    // 展示Toast
    protected void showToast(String message){
        Toast.makeText(BaseActivity.this, message, Toast.LENGTH_SHORT).show();
    }

    @Override
    protected void onResume() {
        super.onResume();
        MobclickAgent.onResume(this);
    }

    @Override
    protected void onPause() {
        super.onPause();
        MobclickAgent.onPause(this);
    }
    @SuppressWarnings("unchecked")
    protected <T extends View> T findView(int id){
        return (T) findViewById(id);
    }
}
